<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
  <head>
    <!--

    %W% %E% %Z%

    Copyright  2009  Sun Microsystems, Inc. All rights reserved.

    -->
    <title>Perseus Builder Package</title>
  </head>

  <body>
    <p>Contains all classes to build a <code>Model</code> tree (see <code>the com.sun.perseus.model package</code>)
    from an SVG document. </p>

    <p>The Builder package uses the SAX 2 API to parse an SVG document and turn
    SVG elements into <code>ModelNode</code> instances.</p>

    <p>The package classes are:</p>

    <ul>
        <li><code>BuildContext</code>. This class contains contextual information about the build
        process, such as the current <code>Locator</code> into the SVG source (i.e., the current
        line number) or the constants to use for units conversion (which depend on context).</li>

        <li><code>BuilderErrors</code>. Defines the error codes generated by the module.</li>

        <li><code>BuilerException</code>. The type of exceptions thrown by the <code>ModelFactory</code>
        (and the classes it uses) when an error happens while building a Model tree from an SVG source</li>

        <li><code>BuilderUtil</code>. This is where the nitty gritty details
        happen. BuilderUtil is used by all the <code>ElementHandler</code> implementations in
        an effort to factor code as much as possible.</li>

        <li><code>ElementHandler</code>. This is the interface for all classes which can turn
        a XML Element and its attributes in a <code>CompositeNode</code> instance. It is
        possible to implement <code>ElementHandler</code> to make Perseus handle any type
        of XML markup. By default, Perseus comes with the <code>ElementHandler</code>
        implementations necessary to implement SVG Tiny content.</li>

        <li><code>FontElementHandler</code>. Handles all SVG Tiny elements in the
        SVG Tiny <a href="http://www.w3.org/TR/SVG11/fonts.html#font-mod">Font module</a></li>

        <li><code>ModelBuilder</code>. This is Perseus' interface with the SAX 2 engine.
        It extends the <code>org.xml.sax.helpers.DefaultHandlers</code> class. This is where
        SAX events are received and where building of <code>ModelNode</code> instances is
        delegated to <code>ModelFactory</code>.</li>

        <li><code>ModelFactory</code>. This class handles all elements found in the
        input SVG source. If there is an <code>ElementHandler</code> for the element, then
        building a corresponding <code>ModelNode</code> is delegated to that element. Otherwise,
        a generic <code>CompositeNode</code> is built to represent the input content.</li>

        <li><code>ShapeElementHandler</code>. Handles all SVG Tiny elements in the
        SVG Tiny <a href="http://www.w3.org/TR/SVG11/shapes.html#shape-mod">Shape module</a></li>

        <li><code>StructureElementHandler</code>. Handles all SVG Tiny elements in the
        SVG Tiny <a href="http://www.w3.org/TR/SVG11/struct.html#basic-structure-mod">Basic Structure module</a></li>

        <li><code>SVGTinyModelFactory</code>. This extension of <code>ModelFactory</code> is
        a utility class that registers (with itself) all the <code>ElementHandler</code>s
        necessary to handle SVG Tiny content.</li>

        <li><code>TextElementHandler</code>. Handles all SVG Tiny elements in the
        SVG Tiny <a href="http://www.w3.org/TR/SVG11/text.html#basic-text-mod">Basic Text module</a></li>

    </ul>
  </body>
</html>
